package com.isotronica.neveras.datos.daos;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;


import com.isotronica.neveras.util.vos.ReporteVO;

public class ReporteDAO extends GenericDAO<ReporteVO>{
	
	public ReporteDAO(Connection connection) {
		super(connection);

		creator = new CallBackCreator<ReporteVO>() {
			public ReporteVO create(ResultSet rs) throws SQLException {
				ReporteVO vo = new ReporteVO();
				vo.setId(rs.getInt("id"));
				vo.setDescripcion(rs.getString("descripcion"));
				vo.setFecha(rs.getDate("fecha"));
				vo.setHora(rs.getTime("hora"));
				vo.setNevera_idNevera(rs.getInt("nevera_idNevera"));
				vo.setTitulo(rs.getString("titulo"));
				
				return vo;
			}

			public String getIdColumn() {
				return "id";
			}
		};
		super.setCreator(creator);
	}

}
